From: Keir Fraser Date: Mon, 1 Oct 2007 08:32:25 +0000 (+0100) Subject: x86: Fix time going backwards on CPU frequency change. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14929^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f53d6f8b4d43f0313b06d780dae4124560a9fa63;p=xen.git x86: Fix time going backwards on CPU frequency change. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 7b23426c6e..d0f45fb018 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -728,11 +728,11 @@ int cpu_frequency_change(u64 freq) u64 curr_tsc; local_irq_disable(); - set_time_scale(&t->tsc_scale, freq); rdtscll(curr_tsc); t->local_tsc_stamp = curr_tsc; t->stime_local_stamp = get_s_time(); t->stime_master_stamp = read_platform_stime(); + set_time_scale(&t->tsc_scale, freq); local_irq_enable(); /* A full epoch should pass before we check for deviation. */